package com.sjhang.controller;


import com.sjhang.entity.TbCodeing;
import com.sjhang.service.TbCodeingService;
import com.sjhang.utils.ListParamVo;
import com.sjhang.utils.ResultResponse;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 大纲教学代码
 前端控制器
 */
@Api(tags = {"大纲代码接口"})
@RestController
@RequestMapping("/tbCodeing")
public class TbCodeingController {

    @Resource
    private TbCodeingService tbCodeingService;

    /**
     * 查询全部代码块
     * @param listParamVo
     * @return
     */
    @PostMapping("/selectCodeIng")
    public ResultResponse selectCodeIng(@RequestBody ListParamVo listParamVo){
        return tbCodeingService.selectCodeIng(listParamVo);
    }

    /**
     * 新增代码块
     * @param tbCodeing
     * @return
     */
    @PostMapping("/insertCodeIng")
    public ResultResponse insertCodeIng(TbCodeing tbCodeing){
        return tbCodeingService.insertCodeIng(tbCodeing);
    }

    /**
     * 修改代码快
     * @param tbCodeing
     * @return
     */
    @PostMapping("/updateCodeIng")
    public ResultResponse updateCodeIng(TbCodeing tbCodeing){
        return tbCodeingService.updateCodeIng(tbCodeing);
    }

    /**
     * 删除代码块
     * @param CodeIngID
     * @return
     */
    @PostMapping("/deleteCodeIng")
    public ResultResponse deleteCodeIng(Long CodeIngID){
        return tbCodeingService.deleteCodeIng(CodeIngID);
    }


}

